From c5c13a436549d0168c93945d52753197a4f352e5 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 15 Jan 2001 15:28:57 +0000 Subject: [PATCH] (x_connection_closed) [USE_X_TOOLKIT]: If x_display_info_for_display returns null, don't try to close the display; we didn't open it. --- src/xterm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index fadeae0e057..0cd68a7f9e3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11288,7 +11288,10 @@ x_connection_closed (dpy, error_message) in OpenWindows. I don't know how to cicumvent it here. */ #ifdef USE_X_TOOLKIT - XtCloseDisplay (dpy); + /* If DPYINFO is null, this means we didn't open the display + in the first place, so don't try to close it. */ + if (dpyinfo) + XtCloseDisplay (dpy); #endif /* Indicate that this display is dead. */ -- 2.30.2